load("//bazel:api.bzl", "mojo_test")

package(default_visibility = ["//visibility:private"])

[
    mojo_test(
        name = src + ".test",
        srcs = [src],
        copts = [
            "--debug-level",
            "full",
        ],
        deps = [
            "@mojo//:stdlib",
            "@mojo//:test_utils",
        ],
    )
    for src in glob(["*.mojo"])
]

# Issue #31111 -- run this test with -O0 also.
mojo_test(
    name = "test_hash_O0",
    srcs = ["test_hash.mojo"],
    copts = [
        "--debug-level",
        "full",
        "-O0",
    ],
    # TODO(MSTDL-1965): Fix this ASAN timeout.
    target_compatible_with = select({
        "//:asan": ["@platforms//:incompatible"],
        "//conditions:default": [],
    }),
    deps = [
        "@mojo//:stdlib",
        "@mojo//:test_utils",
    ],
)
